package com.genntii.examManager.common.result;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class PageResult<T> {
    private long total;
    private ArrayList<T> records;

    public static <T> PageResult<T> build(ArrayList<T> object,long total){
        PageResult<T> pageResult = new PageResult<>();
        pageResult.records = object;
        pageResult.total = total;
        return pageResult;
    }
}
